import http from '../request.js'

/* 
查询所有意见反馈
*/
export function selectAllFeedBack(data) {
  return http.request({
    url: '/admin/feedBack/selectAllFeedBack',
    method: 'post',
    data
  })
}

export function getOneFeedBack(data) {
  return http.request({
    url: '/admin/feedBack/getOneFeedBack?id=' + data,
    method: 'get'
  })
}
// 处理反馈
export function updateFeedBack(data) {
  return http.request({
    url: '/admin/feedBack/updateFeedBack?id=' + data,
    method: 'get'
  })
}

// 版本更新
export function addVersion(data) {
  return http.request({
    url: '/admin/version/addVersion',
    method: 'post',
    data
  })
}
export function selectAllVersion(data) {
  return http.request({
    url: '/admin/version/selectAllVersion',
    method: 'post',
    data
  })
}
export function getNewVersion(data) {
  return http.request({
    url: '/order/version/getNewVersion',
    method: 'get',
    data
  })
}

// 系统通知
/* 
查询系统消息列表
*/
export function selectAllMsg(data) {
  return http.request({
    url: '/admin/msg/selectAllMsg',
    method: 'post',
    data
  })
}

/* 
查询消息详情
*/
export function selectOneMsg(data) {
  return http.request({
    url: '/admin/msg/selectOneMsg?id=' + data,
    method: 'get'
  })
}

/* 
发布消息
*/
export function saveMsg(data) {
  return http.request({
    url: '/admin/msg/saveMsg',
    method: 'post',
    data
  })
}

export function sendMsg(data) {
  return http.request({
    url: '/admin/msg/saveMsg',
    method: 'post',
    data
  })
}

/* 
删除系统消息
*/
export function deleteMsg(data) {
  return http.request({
    url: '/admin/msg/deleteMsg',
    method: 'post',
    data
  })
}

/* 
查询短信列表*/

export function selectAllSms(data) {
  return http.request({
    url: '/admin/sms/selectAllSms',
    method: 'post',
    data
  })
}
/* 
发布短信*/

export function saveSms(ids, data) {
  return http.request({
    url: '/admin/sms/saveSms?ids=' + ids,
    method: 'post',
    data
  })
}

/* 
删除短信*/

export function deleteSms(data) {
  return http.request({
    url: '/admin/sms/deleteSms',
    method: 'post',
    data
  })
}

// push列表
export function pushList(data) {
  return http.request({
    url: '/admin/unipush/pushList',
    method: 'get',
    data
  })
}
/* 
新增push*/

export function addPushActivity(data) {
  return http.request({
    url: '/admin/unipush/addPushActivity',
    method: 'post',
    data
  })
}
/* 
查看push*/

export function pushActivityWatch(data) {
  return http.request({
    url: '/admin/unipush/pushActivityWatch',
    method: 'get',
    data
  })
}

/* 
删除push*/

export function deletePushActivity(data) {
  return http.request({
    url: '/admin/unipush/deletePushActivity',
    method: 'post',
    data
  })
}
/* 查询push黑名单*/
export function queryPushBlackPhone(data) {
  return http.request({
    url: '/admin/unipush/queryPushBlackPhone',
    method: 'post',
    data
  })
}
/* 添加push黑名单*/
export function addPushBlackPhone(data) {
  return http.request({
    url: '/admin/unipush/addPushBlackPhone',
    method: 'post',
    data
  })
}

export function deletePushBlackPhone(data) {
  return http.request({
    url: '/admin/unipush/deletePushBlackPhone',
    method: 'post',
    data
  })
}
/* 查询城市*/
export function queryCity(data) {
  return http.request({
    url: '/admin/unipush/queryCity',
    method: 'get',
    data
  })
}
/* 上传*/
export function uploadExcel(data) {
  return http.request({
    url: '/admin/unipush/uploadExcel',
    method: 'post',
    data
  })
}
/* 下载模版*/
export function downExcel(data) {
  return http.request({
    url: '/admin/unipush/downExcel',
    method: 'post',
    data
  })
}
